/*
 * Copyright 2017 hv0912
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.vimhe.ezimp2.handler.bean;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * 文件数据
 *
 * @author Vimhe
 */
public final class FileData implements Serializable {

    private String fileIndex;
    private Map<Integer, SheetData> value = new HashMap<>(5);

    public FileData(String fileIndex) {
        this.fileIndex = fileIndex;
    }

    public String getFileIndex() {
        return fileIndex;
    }

    public void setFileIndex(String fileIndex) {
        this.fileIndex = fileIndex;
    }

    public Map<Integer, SheetData> getValue() {
        return value;
    }

    public void setValue(Map<Integer, SheetData> value) {
        this.value = value;
    }

    @Override
    public int hashCode() {
        return Objects.hash(fileIndex);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FileData fileData = (FileData) o;
        return Objects.equals(fileIndex, fileData.fileIndex);
    }

    @Override
    public String toString() {
        return "FileData{" +
                "fileIndex='" + fileIndex + '\'' +
                '}';
    }

}
